home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen… 1994 February Supplement / ARPL-Feb-94-Supplement-PowerPC.iso / 3rd Party PowerPC Demo Apps / Aldus FreeHand / Aldus FreeHand 4.0 TV / Aldus FreeHand 4.0 TV.rsrc / Post_1086 < prev    next >
Encoding:
Text File  |  1994-01-25  |  2.7 KB  |  130 lines

  1. %. Error handling code - don't do this if printing to hi res imagesetter
  2. printerRes 1000 lt
  3.  userdict /agd_noerryet true put
  4.  errordict
  5.  /handleerror
  6.  { 
  7. $error begin 
  8. /prt{dup type /stringtype ne{=string cvs}if show}def
  9. newerror
  10. {
  11. /newerror false store 
  12. systemdict begin
  13. grestoreall initgraphics
  14. end
  15. userdict /agd_noerryet get
  16. {
  17. userdict /agd_noerryet false put
  18. 30 90 moveto
  19. 30 122 lineto
  20. 570 122 lineto
  21. 570 90 lineto
  22. closepath
  23. 1 setgray fill
  24. 0 setgray
  25. 30 110 moveto 
  26. /Helvetica findfont 14 scalefont setfont 
  27. (POSTSCRIPT ERROR: ) prt errorname prt ( ) prt
  28. (OFFENDING COMMAND: ) prt /command load prt
  29. 30 95 moveto
  30. (VMSTATUS max: ) prt vmstatus dup prt
  31. ( avail: ) prt exch sub prt
  32. ( level: ) prt prt
  33. } stopped 
  34. pop 
  35. /md where { 
  36. pop
  37. md type /dicttype eq { 
  38. (ioerror) errorname ne{systemdict /showpage get exec}if
  39. } if
  40. } if
  41. } if 
  42. }if 
  43. end
  44.  }
  45.  put
  46. }if
  47. %.
  48. /overlapmark{
  49.  -4 xs div 0 rlineto 
  50.  4 xs div 2 div -7 ys div 2 div rmoveto
  51.  0 7 ys div rlineto 
  52.  4 xs div 0 rlineto 
  53.  0 -7 ys div rlineto 
  54.  -4 xs div 0 rlineto
  55.  .2 xs div setlinewidth 
  56.  0 setseparationgray stroke
  57. }bdf
  58. /amsub{gsave setlinewidth 4 2 roll rmoveto rlineto stroke grestore}bdf
  59. /am{
  60.  newpath 
  61.  moveto     
  62.  0 setseparationgray
  63.  gsave   
  64.  currentpoint 5 xs div 0 360 arc   
  65.  .3 xs div setlinewidth 
  66.  stroke 
  67.  grestore 
  68.  gsave
  69.  currentpoint 3 xs div 0 360 arc   
  70.  fill
  71.  grestore
  72.  3 xs div 0 5 xs div 0 .3 ys div amsub 
  73.  -3 xs div 0 -5 xs div 0 .3 ys div amsub 
  74.  0 3 ys div 0 5 ys div .3 xs div amsub 
  75.  0 -3 ys div 0 -5 ys div .3 xs div amsub 
  76.  1 setseparationgray
  77.  -3 xs div 0 6 xs div 0 .3 ys div amsub 
  78.  0 -3 ys div 0 6 ys div .3 xs div amsub 
  79. }bdf
  80. /fhcbox {
  81.  xt yt moveto
  82.  13.5 xs div 0 rlineto
  83.  0 13.5 ys div rlineto
  84.  -13.5 xs div 0 rlineto
  85.  0 -13.5 ys div rlineto
  86.  gsave fill grestore
  87.  0 setseparationgray stroke 
  88.  dup length 0 ne {
  89. 0 setseparationgray
  90. dup stringwidth pop neg 13.5 xs div add 2 div xt add yt 5 ys div add moveto show
  91.  }
  92.  {pop} ifelse
  93.  xs div xt add /xt xdf
  94. }bdf
  95. /fhcb {
  96.  0.25 xs div 0.25 ys div add 2 div setlinewidth
  97.  2 copy  
  98.  
  99.  
  100.  
  101.  6.75 ys div sub /yt xdf
  102.  25.5 xs div sub /xt xdf
  103.  
  104.  0 1 10 { 
  105. 10 div setseparationgray
  106. -13.5 () fhcbox
  107.  }for
  108.  
  109.  
  110.  
  111.  6.75 ys div sub /yt xdf
  112.  12 xs div add /xt xdf
  113.  
  114.  /Helvetica findfont 5 ys div scalefont setfont
  115.  1 0 0 0 setcmykcolor 13.5 (C) fhcbox
  116.  0 1 0 0 setcmykcolor 13.5 (M) fhcbox
  117.  0 0 1 0 setcmykcolor 13.5 (Y) fhcbox
  118.  1 1 0 0 setcmykcolor 13.5 (CM) fhcbox
  119.  0 1 1 0 setcmykcolor 13.5 (MY) fhcbox
  120.  1 0 1 0 setcmykcolor 13.5 (CY) fhcbox
  121.  1 1 1 0 setcmykcolor 13.5 (CMY) fhcbox
  122.  0 0 0 1 setcmykcolor 13.5 (K) fhcbox
  123. }def 
  124. /mybleed{bleed 0 eq{wdist 10 sub xs div}{bleed}ifelse}bdf
  125. /cm{mybleed neg 0 rmoveto -9 xs div 0 rlineto
  126. 9 xs div mybleed add mybleed neg rmoveto 0 -9 ys div rlineto
  127. .3 xs div setlinewidth 0 setseparationgray stroke}bdf